package com.zl.rbac.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zl.rbac.entity.User;
import com.zl.rbac.entity.UserCondition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户mapper类
 * @InterfaceName: UserMapper
 * @author: suke
 * @since: 2021/1/13 9:18
 */
@Mapper
@Repository
public interface UserMapper extends BaseMapper<User>{


    /**
     * 
     * @Title: 查询指定条件类的记录数
     * @param userCondition: 条件对象
     * @return int
     * @author: suke
     * @since: 2021/1/13 9:52
     */
    public int queryCount(@Param("userCondition")UserCondition userCondition) throws Exception;

    /**
     *
     * @Title: 查询指定条件类的当前页记录
     * @param userCondition: 条件对象
     * @return int
     * @author: suke
     * @since: 2021/1/13 9:52
     */
    public List<User> queryUserAndRoleByPage(@Param("userCondition")UserCondition userCondition) throws Exception;
}
